-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thumbs-up function 👍 #626
Thumbs-up function 👍 #626
Conversation
👀 |
I commented in this 🙏 |
I applied some fixes. Can you check it? 🙏 |
...re/src/main/java/io/github/droidkaigi/confsched2020/data/firestore/internal/FirestoreImpl.kt
Outdated
Show resolved
Hide resolved
@takahirom Now, it is failure to retrieve shards and to create shards. I tried the simple code that retrieves documents of code FirebaseFirestore
.getInstance()
.collection("confsched/2020/sessions/155510/thumbsup_counters")
.get()
.addOnFailureListener {
println(it)
}
.addOnSuccessListener {
println(it.documents)
} error2020-02-02 19:35:30.056 9913-9913/io.github.droidkaigi.confsched2020.debug E/AndroidRuntime: FATAL EXCEPTION: main Process: io.github.droidkaigi.confsched2020.debug, PID: 9913 com.google.android.gms.tasks.RuntimeExecutionException: com.google.firebase.firestore.FirebaseFirestoreException: PERMISSION_DENIED: Missing or insufficient permissions. at com.google.android.gms.tasks.zzu.getResult(Unknown Source:15) at io.github.droidkaigi.confsched2020.data.firestore.internal.FirestoreImpl$getFavoriteSessionIds$2.onComplete(FirestoreImpl.kt:54) at com.google.android.gms.tasks.zzj.run(Unknown Source:4) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) Caused by: com.google.firebase.firestore.FirebaseFirestoreException: PERMISSION_DENIED: Missing or insufficient permissions. at com.google.firebase.firestore.util.Util.exceptionFromStatus(com.google.firebase:firebase-firestore@@20.2.0:121) at com.google.firebase.firestore.core.EventManager.onError(com.google.firebase:firebase-firestore@@20.2.0:134) at com.google.firebase.firestore.core.SyncEngine.handleRejectedListen(com.google.firebase:firebase-firestore@@20.2.0:399) at com.google.firebase.firestore.core.FirestoreClient.handleRejectedListen(com.google.firebase:firebase-firestore@@20.2.0:287) at com.google.firebase.firestore.remote.RemoteStore.processTargetError(com.google.firebase:firebase-firestore@@20.2.0:555) at com.google.firebase.firestore.remote.RemoteStore.handleWatchChange(com.google.firebase:firebase-firestore@@20.2.0:436) at com.google.firebase.firestore.remote.RemoteStore.access$100(com.google.firebase:firebase-firestore@@20.2.0:53) at com.google.firebase.firestore.remote.RemoteStore$1.onWatchChange(com.google.firebase:firebase-firestore@@20.2.0:176) at com.google.firebase.firestore.remote.WatchStream.onNext(com.google.firebase:firebase-firestore@@20.2.0:108) at com.google.firebase.firestore.remote.WatchStream.onNext(com.google.firebase:firebase-firestore@@20.2.0:38) at com.google.firebase.firestore.remote.AbstractStream$StreamObserver.lambda$onNext$1(com.google.firebase:firebase-firestore@@20.2.0:119) at com.google.firebase.firestore.remote.AbstractStream$StreamObserver$$Lambda$2.run(Unknown Source:4) at com.google.firebase.firestore.remote.AbstractStream$CloseGuardedRunner.run(com.google.firebase:firebase-firestore@@20.2.0:67) at com.google.firebase.firestore.remote.AbstractStream$StreamObserver.onNext(com.google.firebase:firebase-firestore@@20.2.0:110) at com.google.firebase.firestore.remote.FirestoreChannel$1.onMessage(com.google.firebase:firebase-firestore@@20.2.0:120) at io.grpc.ForwardingClientCallListener.onMessage(ForwardingClientCallListener.java:33) at io.grpc.ForwardingClientCallListener.onMessage(ForwardingClientCallListener.java:33) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext(ClientCallImpl.java:563) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.firebase.firestore.util.AsyncQueue$DelayedStartFactory.run(com.google.firebase:firebase-firestore@@20.2.0:205) at java.lang.Thread.run(Thread.java:919) Caused by: io.grpc.StatusException: PERMISSION_DENIED: Missing or insufficient permissions. 2020-02-02 19:35:30.056 9913-9913/io.github.droidkaigi.confsched2020.debug E/AndroidRuntime: at io.grpc.Status.asException(Status.java:541) at com.google.firebase.firestore.util.Util.exceptionFromStatus(com.google.firebase:firebase-firestore@@20.2.0:119) ... 26 more |
We haven't changed any rules since we created the issue.
|
I changed the rule 🙏
|
I changed!
|
...re/src/main/java/io/github/droidkaigi/confsched2020/data/firestore/internal/FirestoreImpl.kt
Outdated
Show resolved
Hide resolved
The code fail to create shards... |
Maybe even if there is a value, I think that isEmpty is true. |
…rd id is NUM_SHARDS
...re/src/main/java/io/github/droidkaigi/confsched2020/data/firestore/internal/FirestoreImpl.kt
Outdated
Show resolved
Hide resolved
@@ -10,6 +10,7 @@ | |||
<item name="textAppearanceBody1">@style/TextAppearance.DroidKaigi.Body1</item> | |||
<item name="textAppearanceBody2">@style/TextAppearance.DroidKaigi.Body2</item> | |||
<item name="textAppearanceCaption">@style/TextAppearance.DroidKaigi.Caption</item> | |||
<item name="textAppearanceButton">@style/TextAppearance.DroidKaigi.Button</item> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I changed the rule 🙏
|
|
||
// This function is copied from https://medium.com/androiddevelopers/suspending-over-views-19de9ebd7020 | ||
|
||
suspend fun Animator.awaitEnd() = suspendCancellableCoroutine<Unit> { cont -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
) | ||
} | ||
|
||
val appError: LiveData<AppError?> = merge( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a question. Please tell me why you separated the error 🙋♂
for simplifying??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
The reason is that uiModel's errors is complexed.
In my opinion, it is easy to read that the code is separated success and failure flow.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have added the errorGettable interface. 👍
I think that you can write enough with UiModel by using this. 👀
70f7d25
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, besides whether it is good or bad, I would like to challenge this DroidKaigi to make one UiModel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, let's challenge the one UiModel!
70f7d25 is enough to simple too for me.
@mkeeda |
@takahirom
I will write overviews at top of this PR when I finished all tasks. |
Thanks! I want to merge this today!! 👍 |
Can you delete WIP? 😄 |
Yes! |
Your apk has been deployed to https://deploygate.com/distributions/1f10badbf5012479d46a7dffcc44c18b5a4c3beb. Anyone can try your changes via the link. Generated by 🚫 Danger |
No error was reported but at least one warning was found. Generated by 🚫 Danger |
@takahirom |
LGTM 👍👍👍👍 |
Issue
Overview (Required)
Links
Screenshot